import axios from '@/utils/axios'

// 原有的上传 API（备用）
export const uploadApi: String = import.meta.env.VITE_APP_BASEURL + '/oss/uploadTemp'

// 获取七牛云上传 token
export const getUpToken = async () => {
  const response = await axios.get('/oss/getUpToken')
  if (response.code === 200) {
    return response.data
  }
  throw new Error(response.message || '获取上传 token 失败')
}
